package com.zhike.api.config;

import javax.annotation.PostConstruct;

import org.springframework.context.annotation.Configuration;
import org.springframework.beans.factory.annotation.Value;
import com.zhike.common.utils.ZkUtil;

@Configuration
public class ZkConfig {

    @Value("${IM_SERVER_ZK_HOST}")
    private String zkHost;

    @PostConstruct
    public void init() {
        try {
            ZkUtil.connection(zkHost);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
